package Main;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.FlowLayout;
import javax.swing.JTextField;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import javax.swing.JLabel;
import java.awt.Font;
import java.awt.Frame;

import javax.swing.BoxLayout;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;

public class Fframe extends JFrame {
	private JTextField textField;
	private JTextField textField_1;
	private JPanel contentPane;
	private JPanel contentPane1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Fframe frame = new Fframe();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public Fframe() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 432, 376);
		contentPane = new JPanel();
		contentPane.setForeground(Color.BLUE);
		contentPane.setBorder(new EmptyBorder(5, 14, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		JLabel lblNewLabel = new JLabel("购物系统");
		lblNewLabel.setForeground(Color.BLUE);
		lblNewLabel.setFont(new Font("微软雅黑", Font.PLAIN, 25));
		lblNewLabel.setBounds(165, 10, 100, 55);
		contentPane.add(lblNewLabel);
		
		JButton btnNewButton = new JButton("购买商品");
		btnNewButton.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				Frame1 d = new Frame1();
				d.setVisible(true);
				dispose();
			}
		});
		btnNewButton.addMouseListener(new MouseAdapter() {
			GetGoods s = new GetGoods();
			Menu m = new Menu();
			@Override
			public void mouseClicked(MouseEvent e) {
				m.Menu();
			}
		});
		btnNewButton.setFont(new Font("微软雅黑", Font.PLAIN, 16));
		btnNewButton.setForeground(Color.BLUE);
		btnNewButton.setBounds(128, 64, 165, 36);
		contentPane.add(btnNewButton);
		
		JButton button = new JButton("查看购物车");
		button.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				CarFrame d = new CarFrame();
				d.setVisible(true);
				dispose();
			}
		});
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		button.setForeground(Color.BLUE);
		button.setFont(new Font("微软雅黑", Font.PLAIN, 16));
		button.setBounds(128, 108, 165, 36);
		contentPane.add(button);
		
		JButton button_3 = new JButton("商家系统");
		button_3.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				BussinessFrame d = new BussinessFrame();
				d.setVisible(true);
				dispose();
			}
		});
		button_3.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
			}
		});
		button_3.setForeground(Color.BLUE);
		button_3.setFont(new Font("微软雅黑", Font.PLAIN, 16));
		button_3.setBounds(128, 154, 165, 36);
		contentPane.add(button_3);
		
		JButton button_4 = new JButton("结账");
		button_4.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent e) {
				dispose();
			}
		});
		button_4.setForeground(Color.BLUE);
		button_4.setFont(new Font("微软雅黑", Font.PLAIN, 16));
		button_4.setBounds(128, 212, 165, 36);
		contentPane.add(button_4);
	}
}

